#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int count(int n) {
	int i = 0;
	int sum = 0;
	for (i = 0; i < 32; i++) {
		if (((n >> i) & 1) == 1) {
			sum++;
		}
	}
	return sum;
}
int main() {
	int num = 0;
	scanf("%d", &num);
	int ret = count(num);
	printf("%d\n", ret);
	return 0;
}